﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Guoc.BigMall.WebService.Dto;
namespace Guoc.BigMall.WebService
{
   public interface IAuthenticateService
    {
        /// <summary>
        ///  微信公众号登陆,网页静默登陆
        /// </summary>
        /// <param name="code"></param>
        /// <param name="storeCode"></param>
        /// <returns></returns>
        UserContext WechatLogin(string code, string storeCode);

        /// <summary>
        /// 微信授权登陆，可以获取用户详细信息
        /// </summary>
        /// <param name="code"></param>
        /// <param name="storeCode"></param>
        /// <returns></returns>
        UserContext LoginNeedAuthenticate(string code, string storeCode);

        string GetCodeUrl(string storeCode, string loginUrl);


        /// <summary>
        ///  普通浏览器登陆
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        UserContext Login(LoginDto model);
    }
}
